public class ClientClass {
    public static void main(String[] args) {
        Factory factory = new Factory();

        Fruit fruitA = factory.CreateFruit("A");
        fruitA.eat();  // 输出：eat Apple

        Fruit fruitB = factory.CreateFruit("B");
        fruitB.eat();  // 输出：eat Banana
    }
}